import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia' // 引入 Pinia
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index'
import store from './store/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'//注册Icon图标
import SvgIcon from './components/SvgIcon/SvgIcon.vue'
import './assets/iconfont/iconfont'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

const pinia = createPinia()
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(ElementPlus)
app.use(router)
app.use(store)
app.use(pinia)
app.component('SvgIcon',SvgIcon)
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}